import request from '@/plugins/request';
import axios from 'axios'
export function AccountLogin (data) {
    return request({
        url: '/admin/login',
        // url: 'login',
        // url: '/api/login', // mock 请求
        method: 'post',
        data
    });
}
/* 退出登录 */
export function AccountOut (data) {
    return request({
        url: '/admin/account/out',
        method: 'post',
        data
    });
}
/* 修改密码 */
export function adminUpdatePassword(data) {
    return request({
        url: '/admin/changepwd',
        method: 'post',
        data
    })
}
/* 获取用户详细信息 */
export function adminInfo(data) {
    return request({
        url: '/admin/account/info',
        method: 'post',
        data
    })
}
/* 获取管理员列表 */
export function adminList(data) {
    return request({
        url: '/admin/account/list',
        method: 'post',
        data
    })
}
/* 添加管理员 */
export function adminAdd(data) {
    return request({
        url: '/admin/account/add',
        method: 'post',
        data
    })
}

/* 获取管理员组别 */
export function roleList(data) {
    return request({
        url: '/admin/account/rolelist',
        method: 'post',
        data
    })
}

export function AccountRegister (data) {
    return request({
        url: '/api/register',
        method: 'post',
        data
    });
}

export const getRoutersData = (data) => {
    return axios.request({
        url: '/api/routersData',
        method: 'post',
        data
    });
}
